import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import PlayListDeatil from '../components/PlayListDeatil/playlistdeatil.vue'
import RankListDetail from '../components/rank/RankListDetail.vue'
import Player from '../components/player/Player.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      showTab:true
    }
  },
  {
    path: '/rank',
    name: 'Rank',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "rank" */ '../views/Rank.vue'),
    meta:{
      showTab:true
    }
  },
  {
    path:'/playlistdeatil/:id',
    name:'PlayListDeatil',
    component:PlayListDeatil,
    meta:{
      showTab:false
    }
    
  },
  {
    path:'/ranklistdetail/:id',
    name:'RankListDetail',
    component:RankListDetail,
    meta:{
      showTab:false
    }
    
  },
  {
    path:'/player/:id',
    name:'Player',
    component:Player,
    meta:{
      showTab:false
    }
    
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
